import 'package:flutter/material.dart';
import 'package:get/get.dart';

import 'login.dart';

class RegisterPage extends GetView {
  Map<String, dynamic> data = Map();
  var name = 'NAME_KEY';
  var pass = 'PASS_KEY';
  var code = 'CODE_KEY';
  var email = 'EMAIL_KEY';
  var rePass = 'RE_PASS_KEY';

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('新用户注册'),
      ),
      body: SingleChildScrollView(
        child: Column(
          children: [
            Image.asset('images/loginImg.png'),
            Padding(
              padding: const EdgeInsets.symmetric(horizontal: 16),
              child: Column(
                children: [
                  InputText(
                    data: data,
                    dataKey: name,
                    title: '用户名',
                    space: 48,
                    hintText: '请输入用户名',
                    obscureText: false,
                  ),
                  InputText(
                    data: data,
                    dataKey: pass,
                    space: 62,
                    title: '密码',
                    hintText: '请输入密码',
                    obscureText: true,
                  ),
                  InputText(
                    data: data,
                    space: 36,
                    dataKey: rePass,
                    title: '确认密码',
                    hintText: '请再次输入密码',
                    obscureText: true,
                  ),
                  InputText(
                    space: 64,
                    data: data,
                    dataKey: email,
                    title: '邮箱',
                    hintText: '请输入邮箱',
                    obscureText: false,
                  ),
                  InputText(
                    data: data,
                    dataKey: code,
                    title: '邮箱验证码',
                    hintText: '请输入验证码',
                    space: 24,
                    obscureText: false,
                  ),
                  SizedBox(
                    height: 16,
                  ),
                  RoundButton(
                    title: '注册',
                    color: Colors.green,
                    onPressed: () {},
                  ),
                ],
              ),
            )
          ],
        ),
      ),
    );
  }
}
